import { BaseCommand } from "./BaseCommand";
import { API_EVENT, COMMAND_STATUS } from "@/FrontProcessing/interface";
/**
 * Cmd_Check_Duplicate_Elem
 * @description 检查重复的二维单元
 */
export class Cmd_Cfd_Mesh_Create extends BaseCommand {
  event = API_EVENT.CFD_MESH_CREATE;
  execute(): Promise<any> {
    this.system.history.push(this);
    return new Promise((resolve) => {
      this.status = COMMAND_STATUS.RUNNING;
      this.system.cfd_mesh_create({ ...this.params }).then((res: any) => {
        this.status = COMMAND_STATUS.FINISHED;
        resolve(res);
      });
    });
  }

  undo(): boolean {
    return false;
  }
}
